
import time
t_start = time.time()

a = open("m1_sorted.txt")
arr=[int(i) for i in a]
for i in range (0, len(arr)):
    for j in range (0, len(arr)-1):
        if arr[j]>arr[j+1]:
            t=arr[j]
            arr[j]=arr[j+1]
            arr[j+1]=+t
#print(arr)
t_finish = time.time()
print("m1_sorted", round((t_finish-t_start)*1000), "milliseconds")

import time
t_start = time.time()

a = open("m2_reverse.txt")
arr=[int(i) for i in a]
for i in range (0, len(arr)):
    for j in range (0, len(arr)-1):
        if arr[j]>arr[j+1]:
            t=arr[j]
            arr[j]=arr[j+1]
            arr[j+1]=+t
#print(arr)
t_finish = time.time()
print("m2_reverse.txt", round((t_finish-t_start)*1000), "milliseconds")

import time
t_start = time.time()

a = open("m3_shuffle.txt")
arr=[int(i) for i in a]
for i in range (0, len(arr)):
    for j in range (0, len(arr)-1):
        if arr[j]>arr[j+1]:
            t=arr[j]
            arr[j]=arr[j+1]
            arr[j+1]=+t
#print(arr)
t_finish = time.time()
print("m3_shuffle", round((t_finish-t_start)*1000), "milliseconds")

